﻿<!DOCTYPE html>
<html>
<head>
    <title></title>

    <script src="2009.js"></script>
    <script src="2010.js"></script>
    <script src="2011.js"></script>
    <script src="2012.js"></script>
    <script src="2013.js"></script>
    <script src="2014.js"></script>
    <script src="2015.js"></script>
    <script src="2016.js"></script>
    <script src="2017.js"></script>
    <script src="2018.js"></script>
    <script src="2019.js"></script>
    <script src="2020.js"></script>
</head>
<body>
    <script type="text/javascript">
        //debugger;

        //alert(y2013);
        function getWords() {
            var w;
            var i = 0;
            var yearList = [
                            y2009,
                            y2010,
                            y2011,
                            y2012,
                            y2013,
                            y2014,
                            y2015,
                            y2016,
                            y2017,
                            y2018,
                            y2019,
                            y2020
            ];
            var wordArray = [];
            for (var index in yearList) {
                var year = yearList[index];
                for (var d in year) {
                    i++;
                    w = year[d].y + year[d].j;
                    //document.write(i + "," + w + "<br/>");
                    //document.write("<br/>" + i + ",");
                    var wordList = w.split(".");
                    for (var index in wordList) {
                        var word = wordList[index];
                        if (word !== "") {
                            //document.write(word + "/");
                            wordArray.push(word);
                        }
                    }
                }
            }
            return wordArray;
        }


        function getDistinctWords(words) {
            var distinctWords = [];
            for (var index in words) {
                //document.write(index + "," + words[index]);
                var isExist = false;
                var w = words[index];
                for (var index in distinctWords) {
                    var dw = distinctWords[index];
                    if (w === dw) {
                        isExist = true;
                        break;
                    }
                }

                if (!isExist) {
                    distinctWords.push(w);
                }
            }
            return distinctWords;
        }

        function Display(words) {
            for (var index in words) {
                document.write("<br/>" + index + "," + words[index]);
            }
        }

        Display(getDistinctWords(getWords()));

    </script>
</body>
</html>
